// JORGE FERNANDO GOMEZ
// 1259371
// 189631
// LEC A1
// MARTIN MÜLLER
// D02
// YANG LIU


#ifndef UTIL_C
#define UTIL_C 1

#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>

#include "draw1b.h"


/* FUNCTION PROTOTYPES. */
/* Please see ./util.c for more information. */

/* Resets memory in Figures at position to reset. */
void clear ( Figure * Figures, int position, double reset );

/* Updates information in Figures using parameters found in string. */
void update ( char * string, Figure * Figures, int position, int type );

/* Retrieves the index of nameString inside Figures. */
int getindex ( char * nameString, Figure * Figures );

/* Finds if nameString exists inside Figures structure. */
int exists ( char * nameString, Figure * Figures );

/* Finds number parameters on an alphanumeric string. */
double* getDoubles ( char * string, int blocks2skip, int count );

/* Creates a substring from string and returns a pointer to it. */
char* substr (const char * string, int offset, int length);

/* Removes trailing whitespace (as defined by isspace()) from lineString. */
void chompim (char * lineString);

#endif /* end of include guard: UTIL_C */
